package com.ybzl.gateway.config;


import com.ybzl.gateway.netty.NettyServer;
import com.ybzl.gateway.utils.SlidingWindowProcessor;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import java.net.InetSocketAddress;


@Component
public class SmartInitExtend implements SmartInitializingSingleton {

    @Autowired
    private NettyServer nettyServer;


    @Override
    public void afterSingletonsInstantiated() {
        new Thread(() -> {
            nettyServer.start(new InetSocketAddress(6868));
        }).start();
    }

}
